(eshell-smart-redisplay): Added some safety code to work around a
authorJohn Wiegley <johnw@newartisans.com>
Tue, 24 Apr 2001 03:14:58 +0000 (03:14 +0000)
committerJohn Wiegley <johnw@newartisans.com>
Tue, 24 Apr 2001 03:14:58 +0000 (03:14 +0000)
redisplay problem I've been having.

lisp/eshell/em-smart.el

index 9bef8b10d20f2ec4a2cd4ed966280988f30d87be..0d7810df9e2969ee59e781c12d23d0f4651ada90 100644 (file)
@@ -262,7 +262,11 @@ and the end of the buffer are still visible."
 (defun eshell-smart-redisplay ()
   "Display as much output as possible, smartly."
   (if (eobp)
-      (recenter -1)
+      (save-excursion
+       (recenter -1)
+       ;; trigger the redisplay now, so that we catch any attempted
+       ;; point motion; this is to cover for a redisplay bug
+       (eshell-redisplay))
     (let ((top-point (point)))
       (and (memq 'eshell-smart-display-move pre-command-hook)
           (>= (point) eshell-last-input-start)